package cn.stard.basic.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery {
    // 总条数
    private Integer currentPage = 1;

    // 2.当前页展示条数
    private Integer pageSize = 5;
    // 高级查询
    private  String keyword;
    /**
     * 计算分页起始位置
     * @return
     */
    public Integer getStart(){
        return (this.currentPage - 1) * this.pageSize;
    }
}
